package foundation;

public class TestTransfer {

    Integer sParameter = 1;

    @Override
    public String toString() {
        return "TestTransfer{" +
                "sParameter=" + sParameter +
                '}';
    }


    public static void changeQuote(Integer c) {
        System.out.println("原来的c=>"+c);
        c = c * 5;
    }

    public static void changeQuoteObj(TestTransfer c) {
        System.out.println("原来的c=>"+c);
        c.sParameter = 100;
    }

    public static void changeQuoteString(String c) {
        System.out.println("原来的c=>"+c);
        c = "200";
    }



    public static void main(String[] args) {
        Integer p = 5;    //先声明一个变量p=5
//        String pString = "1";
//        TestTransfer c = new TestTransfer(); //创建对象c
        //利用c的成员函数改变p值,使p=p*5
        changeQuote(p);
//        changeQuoteObj(c);
//        changeQuoteString(pString);
        //输出的是理想值25
        System.out.println("Integer 实参-》"+p);
//        System.out.println("对象 形参-》"+c);
//        System.out.println("String 形参-》"+pString);
        //奇怪输出的是5

    }

}